Skip to content

Conversation

DevinDon
Copy link
Contributor

@DevinDon DevinDon commented Sep 27, 2025

  • 在其他适配器中有关于请求头的合并代码,如默认的 http 模块适配器
  • 如果自定义适配器未合并请求头到 headers 字段,会导致 checkIsEventValidated 函数抛出错误,类似 Issue #135 提到的 Cannot destructure property 'x-lark-request-timestamp' of 'data.headers' as it is undefined
  • 避免解构赋值导致的 Verification Failed 错误,见 Issue #46

@DevinDon
Copy link
Contributor Author

顺便问一嘴,是不是只有飞书支持长连接模式处理事件?我看 Lark 提示 404 好像没部署相关服务。

@DevinDon DevinDon force-pushed the docs/fix-adapter-usage branch from cab0e96 to c371700 Compare September 27, 2025 15:23
- 在其他适配器中有关于请求头的合并代码,如默认的 [http 模块适配器](https://github.com/larksuite/node-sdk/blob/main/adaptor/default.ts#L20)
- 如果自定义适配器未合并请求头到 `headers` 字段,会导致 [`checkIsEventValidated` 函数抛出错误](https://github.com/larksuite/node-sdk/blob/main/dispatcher/request-handle.ts#L108),类似 [Issue #135](#135) 提到的 `Cannot destructure property 'x-lark-request-timestamp' of 'data.headers' as it is undefined`
- 避免解构赋值导致的 Verification Failed 错误,见 [Issue #46](#46 (comment))
@DevinDon DevinDon force-pushed the docs/fix-adapter-usage branch from c371700 to 0627c7e Compare September 27, 2025 15:24
@mazhe-nerd mazhe-nerd merged commit 03cdbdc into larksuite:main Oct 13, 2025
@mazhe-nerd
Copy link
Collaborator

mazhe-nerd commented Oct 13, 2025

对的,目前Lark还没有长连,感谢同学pr~

@DevinDon DevinDon deleted the docs/fix-adapter-usage branch October 13, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants